import {createStore} from "vuex";
export default createStore({
  state:{
    token:'',//'PSEUDO VALIDATION',
    ipinfo:{},
  },
  getters:{
    token:state=>state.token,
    ipinfo:state=>state.ipinfo,
  },
  mutations:{
    SET_TOKEN: (state,token) => { state.token=token },
    SET_IP: (state,ipinfo) => { state.ipinfo = ipinfo }
  },
  actions:{
    logout:({state,commit}) => {
      commit("SET_TOKEN",null)
      console.log("退出")
    }
  }
})
